#include "QSPrecompiledHeaders.h"
#include "QSLuaScriptSystem.h"

using namespace QS;

void LuaScriptSystem::initialize()
{
	L = lua_open();
}

void LuaScriptSystem::shutdown()
{
	if (L)
		lua_close(L);
}

void LuaScriptSystem::execute(const String& chunk)
{
	luaL_dostring(L, chunk.c_str());
}

void LuaScriptSystem::runScript(const QS::String& script)
{
	luaL_dofile(L, script.c_str());
}
